//
//  HWLoginModule.h
//  HWLoginModule
//
//  Created by yehuawei on 2018/11/16.
//  Copyright © 2018 postop. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface HWLoginModule : NSObject

// 是否登录
@property (nonatomic, assign, readonly) BOOL isLogin;

// 上一次登录成功的账号
@property (nonatomic, copy, readonly) NSString *lastAccount;

// 上一次登录成功的密码
@property (nonatomic, copy, readonly) NSString *lastPassword;


/**
 *  单例方法
 *
 *  @return 登录模块的单例
 */
+(instancetype)sharedLoginModule;

/**
 *  修改登录状态
 *
 */
-(void)loggedIn;

/**
 *  修改登录状态
 *
 *  @param account 已登录的账号
 */
-(void)loggedInWithAccount:(nullable NSString *)account;

/**
 *  修改登录状态
 *
 *  @param account 已登录的账号
 *  @param password 密码
 */
-(void)loggedInWithAccount:(nullable NSString *)account password:(nullable NSString *)password;


/**
 *  退出登录
 *
 */
-(void)logout;

@end

NS_ASSUME_NONNULL_END
